﻿<!DOCTYPE html>
<!-- saved from url=(0049)http://www.javamall.com.cn/version6/admin/main.do -->
<html class="panel-fit"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Javashop示例商城</title>

<meta http-equiv="X-UA-Compatible" content="IE=9">
<script>
	
		var data=[{'鞋码':['36','37','38','39','40','41','42','43','44']},{'颜色':['黄色','黑色','白色','灰色','绿色']}];
		var str="<table>";
		for(var a in data){
			//遍历键
			for(var b in data[a]){
				//通过键拿到值
				//alert(data[a][b]);
				//遍历值集合
				str+="<tr><td>"+b+"</td><td>";
				for(var c in data[a][b]){
					str+="<input type='checkbox' value='"+data[a][b][c]+"'/>"+data[a][b][c]+" ";
				}
				str+="</td></tr>";
			}
		}
		str+="</table>";
	alert(str);
	
	/*
	var data={"颜色":["黄色","红色","蓝色"],"尺寸":["M","L","XL"]};{"鞋码":[36,37,38,39,40,41,42,43,44],'颜色':['黄色','黑色','白色','灰色','绿色']};
	for (var a in data){<input type='checkbox' value='"+data[a][b]+"'/>
		alert(data[a]);
	}*/
</script>
</head>
<body>									
</body>
</html>